/**
 * cscenter - dialog
 */
$(document).ready(function(){
	$("#dialogPopupBtn").on("click", function(){
		$("#dialogPopup").dialog({
			width:550
			, height:450
			, modal:true
			, buttons:{
				"send":function(){
					var content = $("textarea[name=contentForReply]");
					if(!content.val()){
						alert("내용을 입력하세요");
					} else {
						sendContent(this);
						content.val('');
					}
				}
				, "cancel":function(){
					$(this).dialog("close");
					//$("#dialogPopup2").dialog("close");
				}
			}
		});
	});
});
function sendContent(form){
	//이메일 전송 처리
	var f1 = window.document.dialogForm;
	//f1.action = "/${initParam.context_root }/admin/cscenter/login/sendEmailForReply.do";
	f1.submit();
	$(form).dialog("close");
	
	/* 
	$("#dialogPopup2").dialog({
		width:400
		, height:300
		, maxWidth:500
		, maxHeight:400
		, modal:false
		, buttons:{
			"cancel":function(){
				$(this).dialog("close");
			}
		}
	});
	*/
}